package aden.Generic;


public class GenViewZoomTool extends GenViewDragTool
{
	public GenViewZoomTool(Gen2DView inView)
	{
		super(inView);
		mIsDragging = false;
	}

	//to be overloaded
	public boolean ProcessEnd(boolean inIsValid)
	{
		if (inIsValid)
		{
			return false;
		}
        if (Math.abs(mFirstX - mLastX) < 5 &&
                Math.abs(mFirstY - mLastY) < 5)
        {
        	mView.Pan(mFirstX,mFirstY);
        }
        else
        {
            mView.Zoom(mFirstX,mFirstY,mLastX,mLastY);
        }
		return true;
	}
}